import { Button, Input, Form,Select} from 'antd';
import React from 'react';
import db from '@/utils/localstorage';
const SearchForm = props =>{
    const { search } =props;
    const onFinish = values =>{
        search(values)
    }
    return <Form
    name="basic"
    layout="inline"
    onFinish={onFinish}
    style={{marginBottom:16}}
  >
    <Form.Item
      label="卡名称"
      name="cardName"
    >
      <Input placeholder="请输入" allowClear/>
    </Form.Item>

    <Form.Item
      label="卡类型"
      name="cardType"
    >
       <Select placeholder="请选择" style={{width:180}} allowClear>
                        {
                            db.get("dictTypeList")&&db.get("dictTypeList")["member_card_type"].map((item,index)=><Select.Option value={item.value} key={index}>{item.label}</Select.Option>)
                        }
    </Select>
    </Form.Item>

    <Form.Item>
      <Button type="primary" htmlType="submit">
        查询
      </Button>
    </Form.Item>
  </Form>
}

export default SearchForm;